<% form_tag(url_for(:action=>"save_assignments")) do -%>
<fieldset class="column-right3" id="agrupacion">
<h2>Lista de Asignaciones</h2>
<br/>
<table class="paginated_table sorted_table" id="list_selected" style="font-size: 9px;">
  <thead>
  <tr>
  <th>Código</th>
  <th>Nombre de Patrimonio</th>
  <th>Acciones</th>
  </tr>
</thead>
  <tbody>
<% @assignments_list.each do |cultural_heritage_cultural_heritage| %>
    <tr >
      <td class="national_registration_code"><p style="font-size: 9px"><%= cultural_heritage_cultural_heritage.nationalRegistrationCode %></p></td>
      <td class="name"><p style="font-size: 9px"><%= cultural_heritage_cultural_heritage.name %></p></td>
    <td>
      <a href="#" cultural-heritage-id='<%= cultural_heritage_cultural_heritage.id %>' class="js_unlink_cultural_heritage" title="Desasociar">
         <img border="0" title="Desasociar" src="/images/navi/0045-badge-circle-direction-left-16-ns.png" alt="Desasociar" />
      </a>
      <input type="hidden" name="cultural_heritage_selected[]" value='<%= cultural_heritage_cultural_heritage.id %>'/>
    </td>
    </tr>
<% end %>
    </tbody>
</table>

  <%= hidden_field_tag "cultural_heritage_id",@cultural_heritage_cultural_heritage.id  %>
  <input type="submit" value="Guardar" class="column-right1" />
<% end %>
</fieldset>
<br></br>
<%#*<script type="text/javascript">%>
  <%#*// form validation function //%>
  <%#*function validate(form) {%>
    <%#*//input%>
    <%#*if ((document.getElementById("list_selected").rows.length)<2) {%>
      <%#*inlineMsg('list_selected','Debe seleccionarse al menos un patrimonio',3);%>
      <%#*return false;%>
    <%#*}%>
  <%#*}%>
<%#*</script>%>